/*
 * @lc app=leetcode.cn id=70 lang=java
 *
 * [70] 爬楼梯
 */

// @lc code=start
class Solution {
    public int climbStairs(int n) {
       int[] data=new int[n+2];
       data[0]=1;
       for (int i = 0; i < data.length-2; i++) {
        data[i+1]+=data[i];
        data[i+2]+=data[i];
       }
       return data[data.length-2];
    }
}
// @lc code=end

